import request from '@/utils/request'

// 查询充电规则列表
export function listScheme(query) {
  return request({
    url: '/system/scheme/list',
    method: 'get',
    params: query
  })
}

// 查询充电规则详细
export function getScheme(chargingSchemeId) {
  return request({
    url: '/system/scheme/' + chargingSchemeId,
    method: 'get'
  })
}

// 新增充电规则
export function addScheme(data) {
  return request({
    url: '/system/scheme',
    method: 'post',
    data: data
  })
}

// 修改充电规则
export function updateScheme(data) {
  return request({
    url: '/system/scheme',
    method: 'put',
    data: data
  })
}

// 删除充电规则
export function delScheme(chargingSchemeId) {
  return request({
    url: '/system/scheme/' + chargingSchemeId,
    method: 'delete'
  })
}
